{Object_Title_and_Purpose

Recieve data to send to another wireless module}


CON

  'nRF24L01 constants:
  
  'Commands
  R_REGISTER = %0000_0000 '+ reg
  W_REGISTER = %0010_0000 '+ reg  $20
  R_RX_PAYLOAD = %0110_0001     ' $61
  W_TX_PAYLOAD = %1010_0000     ' $A0
  FLUSH_TX = %1110_0001         ' $E1
  FLUSH_RX = %1110_0010         ' $E2
  REUSE_TX_PL = %1110_0011      ' $E3
  R_RX_PL_WID = %0110_0000      ' $30
  W_ACK_PAYLOAD = %1010_1000 '+ pipe  ' $A8
  W_TX_PAYLOAD_NOACK = %1011_0000 ' $B0
  NOOP = %1111_1111             ' $FF
                                
  'Registers
  CONFIG = $00   '%0000_1000 / $08
  EN_AA = $01  '%0011_1111  / $3F
  EN_RXADDR = $02  '%0000_0011
  SETUP_AW = $03   '%0000_0011
  SETUP_RETR = $04  '%0000_0011
  RF_CH = $05   '%0000_0010
  RF_SETUP = $06  '%0000_1110
  _STATUS = $07     '%0000_1110 / $E 
  OBSERVE_TX = $08  '%0000_0000
  RPD = $09   '%0000_0000 
  RX_ADDR_P0 = $0A '$E7E7E7E7E7
  RX_ADDR_P1 = $0B '$C2C2C2C2C2
  RX_ADDR_P2 = $0C  '$C3
  RX_ADDR_P3 = $0D  '$C4 
  RX_ADDR_P4 = $0E  '$C5 
  RX_ADDR_P5 = $0F  '$C6 
  TX_ADDR = $10    '$E7E7E7E7E7
  RX_PW_P0 = $11   '%0000_0000
  RX_PW_P1 = $12   '%0000_0000 
  RX_PW_P2 = $13   '%0000_0000 
  RX_PW_P3 = $14  '%0000_0000 
  RX_PW_P4 = $15  '%0000_0000 
  RX_PW_P5 = $16  '%0000_0000 
  FIFO_STATUS = $17 '%0001_0001 
  DYNPD = $1C   '%0000_0000
  FEATURE = $1D  '%0000_0000


  'Nordic Pins:
  _SpiIrq = 0
  _SpiMiso = 1
  _SpiMosi = 2
  _SpiSck = 3 
  _SpiCsn = 4     
  _SpiCe = 5

  _TxLed  = 6
  _RxLed  = 7

  _LargestPayloadSize = 32
  _DefaultPayloadSize = _LargestPayloadSize

  _AddressSizeOffset = 3
  _StatusnOffset = 7
  _PayloadOffset = 8
  _RxAddressOffset = 9
  _DynamicPL = 10
  _Feature = 11

  'Modes:
  PTXmode = 1
  PRXmode = 2
  PTXwithRX = 3
  PRXwithAddr = 4

  'Pin Masks:
  IRQMask = %1 << _SpiIrq
  IRQState = $FFFFFFFF
  PortA = 0
  PortB = 1

  'Status Masks:
  RX_DR   = %01000000
  TX_DS   = %00100000
  MAX_RT  = %00010000
  TX_FULL = %00000001

  TXStatus    = %00000001
  RXStatus    = %00000010

  PacketAveragingTime = 10

  _DebugBaud = 57600 
  
VAR
  byte ModuleMode
  byte tempSize
  byte tempAddr[5]
  byte tempData[32]
  byte globalPayload[_LargestPayloadSize + 1] ' Add 1 so a terminating zero may be added if desired.
  byte newData
  byte request
  byte TX_FIFOdata[32 * 16]
  byte TX_FIFOaddr[ 3 * 16]
  byte TX_FIFOsize[ 1 * 16]
  long TX_FIFOpos1
  long TX_FIFOpos2

  long ARC_Cnt
  long numPackets
  long PLOS_Cnt

  long numPRX
  long AvgSignalStrength
  byte SyncStat

  byte cog

  long Stack[200]

  long interval1
  long startTime1

  byte RadioStatus
   
OBJ
  Nordic : "NordicBeta110718a 5.29.12"
  'I2C     : "Very Basic I2C" 
  Debug : "FullDuplexSerial"
    
PUB start(mode, desiredCh) | status, localIndex 

  'cogstop(cog)
  
  'Debug.start(31, 30, 0, _DebugBaud)
  
  {SET PRX -or- PTX}
  ModuleMode := mode
  if ModuleMode == PTXmode
    configNew[0] &= %11111110
  elseif ModuleMode == PRXmode
    configNew[0] |= %00000001
  else
    result := 1 ' Not a valid operating mode.
    return
  
  if desiredCh => 1 AND desiredCh =< 125
    configNew[5] := desiredCh & %01111111
  else
    result := 2 ' Not a valid RF channel.
    return

  'Initialize Nordic nRF24L01
  Nordic.Start(_SpiSck, _SpiMiso, _SpiMosi, _SpiCsn, _SpiCe, @configNew)

  'Debug.str(String(" IRQ: "))
  'Debug.bin(ina[_SpiIRQ], 1)

  localIndex := SpiCheck       
  if (localIndex == 104)
    'payloadSize := byte[@configNew + _PayloadOffset] ' change whenever Nordic is configured.
    cog := cognew(run, @Stack)
    if cog =< 7 AND cog => 0
      result := 100
    else
      result := 12
  else
    result := localIndex 


  dira[_SpiIrq]~
  
  {Set PTX or PRX LED}
         
PUB getModuleMode

  result := ModuleMode

PRI SpiCheck | localIndex
  'Debug.start(31, 30, 0, _DebugBaud)
  'Debug.str(String(13, "Attempting to read rx address from module."))
  Nordic.SpiReadPub(Nordic#RX_ADDR_P0, @globalPayload, 5)
  'Debug.str(String(13, "rx address = $"))
  'repeat localIndex from 0 to 4
    'Debug.hex(globalPayload[localIndex], 2)
  if CompareArrays(@globalPayload, @testAddress, 5) == -1
    'Debug.str(String(13, "The present rx address is the same as the test address."))
    'Debug.str(String(13, "Changing the test address from $"))
    'repeat localIndex from 0 to 4
      'Debug.hex(testAddress[localIndex], 2)
    'Debug.str(String(", to $"))
    repeat localIndex from 0 to 4
      testAddress[localIndex] += $11
      'Debug.hex(testAddress[localIndex], 2)
  'Debug.str(String(13, "Attempting to write following rx address to module: $"))
  'repeat localIndex from 0 to 4
    'Debug.hex(testAddress[localIndex], 2)
  Nordic.SpiWritePub(Nordic#RX_ADDR_P0, @testAddress, 5)
  'Debug.str(String(13, "Reading rx address from module: $"))
  Nordic.SpiReadPub(Nordic#RX_ADDR_P0, @globalPayload, 5)
  'repeat localIndex from 0 to 4
    'Debug.hex(globalPayload[localIndex], 2)
  if CompareArrays(@globalPayload, @testAddress, 5) == -1
    'Debug.str(String(13, 13, "!!!!Success!!!!")) 
    'Debug.str(String(13, 13, "The rx address was successfully changed.")) 
    'Debug.str(String(13, "The test rx address will not necessarily be the rx address used")) 
    'Debug.str(String(13, "in communicating with other modules.", 13))
    result := 104 
  else
    'Debug.str(String(13, 13, "** Failure **")) 
    'Debug.str(String(13, 13, "The rx address was NOT changed.")) 
    'Debug.str(String(13, "The Propeller was not able to communicate with the")) 
    'Debug.str(String(13, "Nordic module.", 13))
    result := 10

PRI CompareArrays(localPtr0, localPtr1, localSize)

  result := -1
  repeat localSize
    if byte[localPtr0++] <> byte[localPtr1++]
      result := 0
          
PRI FIFOadd(addr, data, length) | localIndex
  'TX_FIFOaddr[
  repeat localIndex from 0 to length
    byte[TX_FIFOdata[TX_FIFOpos2[localIndex]]] := data[localIndex]
  if TX_FIFOpos2 == TX_FIFOdata+15*_LargestPayloadSize
    TX_FIFOpos2 := 0
  else
    TX_FIFOpos2 += _LargestPayloadSize

PRI FIFOread(addr, data, length) | localIndex    
  byte[@addr] := TX_FIFOaddr[TX_FIFOpos1]
  byte[@length] := TX_FIFOsize[TX_FIFOpos1]
  repeat localIndex from 0 to length
    byte[@data[localIndex]] := TX_FIFOdata[localIndex]

PRI FIFOnext
  {To be continued}  


PRI attemptSync | localIndex, status, timer, reset

  'Debug.str(String(13, 13, "Inside attemptSync", 13))
  interval1 := clkfreq * 8
  
  if ModuleMode == PTXMode
    SetNordicToPRX(@SyncAddr)
    'tempData := $02_A00000 + PRX_cnt +1 ' command $02 means "here is your PRX address".
    'tempAddr := %000 ' Pipe 0.
    Nordic.TransmitAck(@SyncAddr, @SyncData, 4)
    SyncStat := result := 150
    waitcnt(clkfreq/2 + cnt)
    startTime1 := cnt 'Start Timer
    'Debug.str(String("PTX Sync Mode; Timer Started", 13))

    'repeat
    '  status := Nordic.GetStatus
    '  SyncStat := status
    '  waitcnt(clkfreq/2 + cnt)
    repeat
      reset := 0
      if ina[_SpiIrq] == 0 ' if IRQ is active
        {after IRQ}
        status := Nordic.GetStatus
        'Debug.str(String("Nordic Status: "))
        'Debug.bin(status, 8)
        'Debug.str(String(" IRQ: "))
        'Debug.bin(ina[_SpiIRQ], 1)
        'waitcnt(clkfreq/100 + cnt)
        if status & RX_DR ' good, received a packet.
          reset |= RX_DR
          RadioStatus |= RXStatus
          Nordic.ReadPayload(@tempData)
          RadioStatus &= !RXStatus
          if byte[tempData] == $01
            'byte[PRX_db][PRX_cnt] := tempData
            PRX_cnt++ 
            {WRITE new PRX in DB} ' The PRX has received the address.
            configNew[0] := configNew[0] & %11111110  ' Switch back to PTX mode
            Nordic.Configure(@configNew)
            numPRX++
            SyncStat := result := 103 ' Successfully transfered new PRX address
            ModuleMode := PTXwithRX
          else
            Nordic.TransmitAck(@SyncAddr, @SyncData, 4) 'did not rx correct command, continue listening.
            SyncStat := result := 7 ' Did not recieved correct command
        else
          reset |= RX_DR | TX_DS | MAX_RT
          SyncStat := result := 8 ' Unknown IRQ           
        if(reset)
          'Debug.str(String(" Reseting: "))
          'Debug.bin(reset, 8)
          Nordic.SetStatus(reset)
        'Debug.tx(13)
      else
        waitcnt(clkfreq/2000 + cnt) 'wait 500us
        SyncStat := 151 ' No IRQ
       if cnt - startTime1 > interval1
        ModuleMode := 0
        SyncStat := result := 6 ' Timeout: Did not receive request for SYNC
        quit
    
  else
    tempAddr := $B00001
    SetNordicToPTX(@SyncAddr)
    tempData := $02
    SyncStat := result := 150 
    status := Nordic.GetStatus
    waitcnt(clkfreq/2 + cnt) 
    startTime1 := cnt 'Start Timer

    'repeat      
    '  status := Nordic.GetStatus
    '  SyncStat := status
    ' waitcnt(clkfreq/2 + cnt)
      
    repeat
      reset := 0
      status := Nordic.GetStatus
      if status & TX_FULL
        SyncStat := result := status ' TX_FULL, error
        Nordic.FlushTX
        waitcnt(clkfreq/2 + cnt)
      else
        'SyncStat := result := 77 ' TX_FULL, error
        'waitcnt(clkfreq + cnt)
        RadioStatus |= TXStatus
        Nordic.Transmit(@SyncAddr, @tempData, 1)
        RadioStatus &= !TXStatus
        if ina[_SpiIrq] == 0 ' if IRQ is active
          status := Nordic.GetStatus
          if status & TX_DS 'good, now wait for a response from PTX
            reset |= TX_DS
            if status & RX_DR ' good, received the ACK packet with the requested addr.
              reset |= RX_DR
              RadioStatus |= RXStatus
              Nordic.ReadPayload(@tempData)
              RadioStatus &= !RXStatus
              if tempData == $02
                repeat localIndex from 0 to 2
                  rxAddress[localIndex] := byte[tempData][localIndex]
                Nordic.SetStatus(TX_DS | RX_DR)
                SetNordicToPRX(@rxAddress)
                SyncStat := result := 102 ' Successfully recieved new PRX address
                ModuleMode := PRXwithAddr
              else
                Nordic.Transmit(@SyncAddr, @tempData, 1)
                SyncStat := result := 7
            else
              SyncStat := result := 9 ' did not recieve expected ACK payload
              reset |= TX_DS
          elseif status & MAX_RT
            reset |= RX_DR
            SyncStat := result := 4 ' No PTX found
        else
          waitcnt(clkfreq/2 + cnt) 'wait 500ms
          SyncStat := 151 ' No IRQ
      if(reset)
        Nordic.SetStatus(reset)
      if cnt - startTime1 > interval1
        ModuleMode := 0
        SyncStat := result := 6 ' No PTX found
        quit
        
PRI SetNordicToPRX(_addr) | localIndex

  configNew[0] := configNew[0] | %00000001 ' Switch to PRX mode
  repeat localIndex from 0 to 2            ' Set RX address
    rxAddress[localIndex] := byte[_addr][localIndex]  
  Nordic.Configure(@configNew) ' Configure and begin receiving.

PRI SetNordicToPTX(_addr) | localIndex

  configNew[0] := configNew[0] & %11111110  ' Switch to PTX mode
  repeat localIndex from 0 to 2            ' Set RX address
    rxAddress[localIndex] := byte[_addr][localIndex]
  repeat localIndex from 0 to 2            ' Set TX address
    txAddress[localIndex] := byte[_addr][localIndex]
  Nordic.Configure(@configNew) ' Configure and begin transmitting.    
  
  
PUB Stop ' turn off Nordic and stop cog
    if request := 0
      request := 5   
  

PUB Send(_addr, _data, length) | localIndex
  if request == 0
    repeat localIndex from 0 to 2
      tempAddr[localIndex] := byte[_addr][localIndex]
    repeat localIndex from 0 to length
      tempData[localIndex] := byte[_data][localIndex]
    tempSize := length
    request := 2
    result := 1
  else
    result := 0

PUB isNewData
  if newData == 1
    newData := 0
    result := 1
  else
    result := 0

PUB Sync
  if request == 0
    request := 3
    SyncStat := 99
    result := 1
  else
    result := 0
  
PUB getRadioStatus

  result := RadioStatus
  
PUB getSyncStatus
  'if request == 3
    result := SyncStat
  'else
    {Send PRX/PTX association stats}
  '  result := 0

PUB SetChannel(desiredCh)
  if request == 0
    if desiredCh >= 1 AND desiredCh <= 125
      tempAddr[0] := desiredCh
      request := 4
      result := 1
    else
      result := 2 ' Not a valid RF channel.
  else
    result := 0

PUB getSignalStrength

  result := AvgSignalStrength

PUB setRxAddress(_addr) | localIndex

  repeat localIndex from 0 to 2
    byte[@rxAddress][localIndex] := byte[@_addr][localIndex]
  Nordic.SpiWritePub(RX_ADDR_P0, @rxAddress, 3)
  
PUB setTxAddress(_addr) | localIndex

  repeat localIndex from 0 to 2
    byte[@txAddress][localIndex] := byte[@_addr][localIndex]
  Nordic.SpiWritePub(TX_ADDR, @txAddress, 3)
  
PUB getRxAddress

  Nordic.SpiReadPub(RX_ADDR_P0, @rxAddress, 3)
  result := @rxAddress

PUB getTxAddress

  Nordic.SpiReadPub(TX_ADDR, @txAddress, 3)
  result := @txAddress
      
PRI run | localIndex, reset

  repeat
    'waitcnt(clkfreq / 4 + cnt) ' give slave device chance to receive and transmit

      
    if ina[_SpiIrq]  == 0 'Wait for IRQ
      RadioStatus |= RXStatus
      {Determine type of IRQ}
      localIndex := Nordic.GetStatus
      if localIndex & RX_DR 'RX_DR Recieve Data Ready IRQ
        {receive Payload}
        
        if newData == 0
          Nordic.ReadPayload(@globalPayload)
         newData := 1
        
        reset |= RX_DR 'Write 1 to RX_DR in Status Register
      if localIndex & TX_DS ' TX_DS Successfully Sent TX.
        numPackets++
        ARC_Cnt += Nordic.GetObserveTX & %00001111
        {Clear sent byte from the TX FIFO -FUTURE}
        reset |= TX_DS 'Write 1 to TX_DS in Status Register
      if localIndex & MAX_RT ' MAX_RT Max Retries Reached
        numPackets++
        PLOS_Cnt++
        {Warn about lack of connection}
        reset |= MAX_RT 'Write 1 to MAX_RT in Status Register
      if reset
        Nordic.SetStatus(reset) 'if needed, rewrite status byte to clear IRQs
      RadioStatus &= !RXStatus
    
    if request == 3  'SYNC
      result := attemptSync      
      request := 0

    if request == 2  'SEND
      if ModuleMode == PTXMode
        RadioStatus |= TXStatus 
        Nordic.Transmit(@tempAddr, @tempData, tempSize)
        RadioStatus &= !TXStatus
      elseif ModuleMode == PRXMode
        Nordic.TransmitAck(@tempAddr, @tempdata, tempSize)
      request := 0

    if request == 4 'Change Channel
      configNew[5] := tempAddr & %01111111
      Nordic.Configure(@configNew)
      request := 0

    if request == 5 ' power down Nordic
      configNew[0] &= %11111101 
      Nordic.Configure(@configNew)
      cogstop(cog) 
      request := 0
      
    if numpackets => PacketAveragingTime
      AvgSignalStrength := (ARC_Cnt + PLOS_Cnt*15) / (numPackets*15) {will prob need to use FLOAT objects here}
      ARC_Cnt := PLOS_Cnt := numPackets := 0
    
DAT
                                       '1         2         3
                             '01234567890123456789012345678901
packetTemplate          byte "$00 + $00 = $0000   ", 0
whatsUpMessage          byte "Wake up over there! ", 0

testAddress   byte $AA, $BB, $CC, $DD, $EE

''------------------ Cofig settings for new nRF24L01+ modules ----------------------------------------
'' ----------------- Keep below together and in order ------------------------------------------------
'' -------- Current configuration below is for a PTX. -------
'' Program will modify this for its own use.-----

configNew     byte %0_0_0_0_1_1_1_0 '%00111011  Register $00  Config
              ' use %00111111($3F)(2 bytes CRC) or %00111011($3B)(1 byte CRC)
              ' when communicating with older nRF2401A modules
              ' make sure this matches nRF2401A setting
              ' %00001111($0F) future with more irq options
              ' 7 only zero allowed, 6 Mask irq by RX_DR (1 = no irq), 5 Mask TX_DS, 4 Mask MAX_RT,
              ' 3 Enable CRC, 2 CRC size (1 = 2 bytes), 1 1 = power up, 0 1 = PRX 0 = PTX
              ' RX_DR Receive Data Ready
              ' TX_DS Transmit Data Sent
              ' MAX_RT Maximum Retries
              byte %00_0_0_0_0_0_1 ' Register $01 Auto Acknowledge
              ' use $00 when communicating with older nRF2401A modules
              ' %00111111 future
              ' 7:6 only %00, enable pipe 5 through 0
              byte %00_0_0_0_0_0_1 ' Register $02 Enabled RX Addresses
              ' 7:6 only zero allowed, 5:0 enable rx addresses pipe 5:0
              byte %000000_01 ' Register $03 SETUP_AW setup Address Widths 
              ' 7:2 only %000000, 1:0 %01 = 3 %11 = 5
              byte %0001_1111 ' Register $04 SETUP_RETR Setup Auto Retransmission
              ' use $00 when communicating with older nRF2401A modules     
              ' %00101111 = 750us delay to retx, tx 15 tries
              ' %01001111 = 1250us delay to retx, tx 15 tries
              ' 7:4 ARD delay 1111 = 4000us, 3:0 retry count 0 - 15 (1111)
              byte %0_1111101 'Ch. 125 Register $05 RF_CH RF Channel
              ' 7 leave 0, 6:0 frequency channel
              ' F = (2400 + RF_CH)MHz (both nRF24L01+ and nRF2401A modules)
              byte %00_0_0_0_11_0 ' Register $06 RF_SETUP RF Setup
              ' don't use 2Mbps when communicating with older nRF2401A modules
              ' $06 = 1Mbps and full power
              ' 7:6 %00 only, 5 RF_DR_LOW 1 = 250kbps use 0 for higher speeds, 4 leave %0
              ' 3 1 = 2Mbps 0 = 1Mbps, 2:1 RF_POWER %11 = 0dBm (highest power), 0 don't care
              ' Register $07 STATUS Status Register used below.
              ' Register $08 OBSERVE_TX 7:4 lost packet count (read only),
              ' 3:0 retransmitted packets count (read only).  I plan to use this
              ' register's infomation in the future.
              ' Register $09 RPD 7:1 reserved (read only), 0 Received Power Detector (read only)
              ' Register $0A RX_ADDR_P0 39:0 Receive address pipe 0, 5 bytes maximum LSByte written first
              ' used below rxAddress0 and rxAddress1
              ' Register $0B RX_ADDR_P1 39:0 Receive address pipe 1
              ' Register $0C RX_ADDR_P2 7:0 Receive address pipe 2
              ' Register $0D RX_ADDR_P3 7:0 Receive address pipe 3
              ' Register $0E RX_ADDR_P4 7:0 Receive address pipe 4
              ' Register $0F RX_ADDR_P5 7:0 Receive address pipe 5
              ' Register $10 TX_ADDR 39:0 Transmit address
'configNew[7]
nordicStatus  byte %0_1_1_1_000_0 ' $40   %01110000   '$70
              ' only zero allowed, Data Ready RX, TX ACK received, MAX_RT failed,
              ' 3:1 Data pipe with payload %111 if empty (read only), 0 1= TX FIFO full (read only)
rxPayload     byte 20 '25 '32   ' Register $11 RX_PW_P0
              ' This will need to be reduced to 25 (assuming 2 bytes CRC and 5 bytes address)
              ' to work with older nRF2401 modules.
              ' Newer nRF24L01+ modules can have payloads as large as 32 bytes.
              ' 7:6 only zero allowed, 5:0 Number of bytes in RX payload in data pipe 0
              ' (1 to 32)(0 = pipe not used)
              ' Register $12 RX_PW_P1 7:6 only zero allowed,
              ' 5:0 Number of bytes in RX payload in data pipe 1
              ' (1 to 32)(0 = pipe not used)
              ' Register $13 RX_PW_P2 7:6 only zero allowed,
              ' 5:0 Number of bytes in RX payload in data pipe 2
              ' Register $14 RX_PW_P3 7:6 only zero allowed,
              ' 5:0 Number of bytes in RX payload in data pipe 3
              ' Register $15 RX_PW_P4 7:6 only zero allowed,
              ' 5:0 Number of bytes in RX payload in data pipe 4
              ' Register $16 RX_PW_P5 7:6 only zero allowed,
              ' 5:0 Number of bytes in RX payload in data pipe 5
              ' Register $17 FIFO_STATUS 7 only zero allowed, 6 TX_REUSE (read only), 
              ' 5 TX_FULL %1 = full (read only), 4 TX_EMPTY %1 = empty (read only),
              ' 3:2 only zero allowed, 1 RX_FULL %1 = full (read only),
              ' 0 RX_EMPTY %1 = empty (read only)
              ' Register $1C DYNPD Enable dynamic payload length, 7:6 only zero allowed,
              ' 5 DPL_P5 Enable dynamic payload length data pipe 5 (Requires EN_DPL and ENAA_5)
              ' 4 DPL_P4 Enable dynamic payload length data pipe 4 (Requires EN_DPL and ENAA_4)
              ' 3 DPL_P3 Enable dynamic payload length data pipe 3 (Requires EN_DPL and ENAA_3)
              ' 2 DPL_P2 Enable dynamic payload length data pipe 2 (Requires EN_DPL and ENAA_2)
              ' 1 DPL_P1 Enable dynamic payload length data pipe 1 (Requires EN_DPL and ENAA_1)
              ' 0 DPL_P0 Enable dynamic payload length data pipe 0 (Requires EN_DPL and ENAA_0)
              ' Register $1D FEATURE Feature Register 7:3 only zero allowed,
              ' 2 EN_DPL Enables Dynamic Payload Length, 1 EN_ACK_PAY Enables Payload with ACK,
              ' 0 EN_DYN_ACK Enables the W_TX_PAYLOAD_NOACK command

rxAddress     byte $A0, $00, $01 ' Register $0A Receive address data pipe 0, LSByte first
txAddress     byte $A0, $00, $01 ' Register $10 Transmit address data pipe 0, LSByte first
SyncAddr      byte $B0, $00, $01
SyncData      byte $02, $A0, $00, $01

DynamicPL     byte %00_1_1_1_1_1_1
Feat          byte %000000_1_1_1

PRX_cnt       byte $00
PRX_db        byte $00[5 * 64] 
'' ----------------- Keep above together and in order ------------------------------------------------

     
        